import java.io.File;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-08-14
 * Time: 21:09
 */
public class demo3 {
    public static void main(String[] args) {
        File file = new File(".");
        System.out.println(Arrays.toString(file.list()));//返回File对象代表的目录下的所有的文件名,返回值类型String[]
    }
}
